package utfpr.gang5.hermes.controledepresenca;

import utfpr.gang5.hermes.controledepresenca.services.AlunoService;
import utfpr.gang5.hermes.controledepresenca.services.CalendarioSemanalService;
import utfpr.gang5.hermes.controledepresenca.services.CursoService;
import utfpr.gang5.hermes.controledepresenca.services.DisciplinaService;
import utfpr.gang5.hermes.controledepresenca.services.PresencaService;
import utfpr.gang5.hermes.controledepresenca.services.ProfessorService;
import utfpr.gang5.hermes.controledepresenca.services.UsuarioService;
import utfpr.gang5.hermes.controledepresenca.services.impl.HibernateAlunoServiceImpl;
import utfpr.gang5.hermes.controledepresenca.services.impl.HibernateCalendarioSemanalServiceImpl;
import utfpr.gang5.hermes.controledepresenca.services.impl.HibernateCursoServiceImpl;
import utfpr.gang5.hermes.controledepresenca.services.impl.HibernateDisciplinaServiceImpl;
import utfpr.gang5.hermes.controledepresenca.services.impl.HibernatePresencaServiceImpl;
import utfpr.gang5.hermes.controledepresenca.services.impl.HibernateProfessorServiceImpl;
import utfpr.gang5.hermes.controledepresenca.services.impl.HibernateUsuarioServiceImpl;

public class Factory {
	
	private static UsuarioService usuarioService = null;
	
	public static UsuarioService getUsuarioService() {
		if (usuarioService == null) {
			usuarioService = new HibernateUsuarioServiceImpl();
		}
		return usuarioService;
	}
	
	private static AlunoService alunoService = null;
	
	public static AlunoService getAlunoService() {
		if (alunoService == null) {
			alunoService = new HibernateAlunoServiceImpl();
		}
		return alunoService;
	}
	
	private static CursoService cursoService = null;
	
	public static CursoService getCursoService() {
		if (cursoService == null) {
			cursoService = new HibernateCursoServiceImpl();
		}
		return cursoService;
	}
	
	private static PresencaService presencaService = null;
	
	public static PresencaService getPresencaService() {
		if (presencaService == null) {
			presencaService = new HibernatePresencaServiceImpl();
		}
		return presencaService;
	}
	
	private static DisciplinaService disciplinaService = null;
	
	public static DisciplinaService getDisciplinaService() {
		if (disciplinaService == null) {
			disciplinaService = new HibernateDisciplinaServiceImpl();
		}
		return disciplinaService;
	}
	
	private static ProfessorService professorService = null;
	
	public static ProfessorService getProfessorService() {
		if (professorService == null) {
			professorService = new HibernateProfessorServiceImpl();
		}
		return professorService;
	}
	
	private static CalendarioSemanalService calendarioSemanalService = null;
	
	public static CalendarioSemanalService getCalendarioSemanalService() {
		if (calendarioSemanalService == null) {
			calendarioSemanalService = new HibernateCalendarioSemanalServiceImpl();
		}
		return calendarioSemanalService;
	}
	
}
